from flask import Flask
from vilipixiv.views import blue
from vilipixiv.ygy.views import ygy
from vilipixiv.sj import sj
from .get_img import get_image_names


def create_app():
    app = Flask(__name__, template_folder='templates', static_folder='static', static_url_path='/static')
    app.config['UPLOAD_FOLDER'] = r'vilipixiv/static/uploads/photos/'
    app.config['DOWN_FOLDER'] = r'vilipixiv/static/downloads/photos/'
    app.register_blueprint(blue)
    app.register_blueprint(ygy, url_prefix='/ygy')
    app.register_blueprint(sj)
    return app



